import React, { Component } from 'react'
import { Form, Row, Col, Input } from 'antd'
import { TwsReactMarkdownEditor } from 'tws-antd'

const FormItem = Form.Item

export default class TaskCardFrom extends Component {
  state = {
    value: ''
  }

  handleChange = (value) => {
    this.setState({
      value
    })
  }

  render() {
    return (
      <Row>
        <Col span={24}>
          <Form>
            <FormItem
              hasFeedback
              label='名称'
              labelCol={{
                span: 4
              }}
              wrapperCol={{
                span: 16
              }}
            >
              <Input />
            </FormItem>
            <FormItem
              hasFeedback
              label='描述'
              labelCol={{
                span: 4
              }}
              wrapperCol={{
                span: 16
              }}
            >
              <TwsReactMarkdownEditor
                value={this.state.value}
                onChange={this.handleChange} />
            </FormItem>
          </Form>
        </Col>
      </Row>
    )
  }
}
